﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MP3Ganizer.BusinessObject.Infos
{
    public class MP3Infos : MP3Ganizer.BusinessObject.Infos.IHoldInfos
    {
        
        private MP3Infos(IEnumerable<string> artists, string album, string title, int trackNumber, string sourcePath, IEnumerable<string> images, Guid id)
        {
            Artists = artists;
            Album = album;
            Title = title;
            TrackNumber = trackNumber;
            SourcePath = sourcePath;
            Images = images;
            Id = id;

        }

        public MP3Infos(IEnumerable<string> artists, string album, string title, int trackNumber, string sourcePath, IEnumerable<string> images) :
            this( artists, album, title, trackNumber, sourcePath, images, Guid.NewGuid())
        {
            
        }

        public IEnumerable<string> Artists { get; set; }

        public string Album { get; set; }

        public string Title { get; set; }

        public int TrackNumber { get; set; }

        public string SourcePath { get; set; }

        public Guid Id { get; private set; }

        public IEnumerable<string> Images { get; set; }


        public MP3Infos ChangeSourcePath(string filePath)
        {
            return new MP3Infos(Artists, Album, Title, TrackNumber, filePath, Images, Id);
        }

        public MP3Infos ChangeArtists(IEnumerable<string> artists)
        {
            return new MP3Infos(artists, Album, Title, TrackNumber, SourcePath, Images, Id);
        }

        public MP3Infos ChangeAlbum(string album)
        {
            return new MP3Infos(Artists, album, Title, TrackNumber, SourcePath, Images, Id);
        }

        public MP3Infos ChangeTitle(string value)
        {
            return new MP3Infos(Artists, Album, value, TrackNumber, SourcePath, Images, Id);
        }

        public MP3Infos ChangeTrackNumber(int value)
        {
            return new MP3Infos(Artists, Album, Title, value, SourcePath, Images, Id);
        }
    }
}
